{% extends "base.html" %}

{% block title %}Osebni podatki študenta{% endblock %}

{% block content %}
<div class="module" id="searchlist">
	<table cellspacing="0"> 
  	<th colspan="2"><a>Osebni podatki študenta</a></th>
  	<th style="text-align: right;">
    {% if not print_view %}<span align="right" class="paginator"><a href="?print=1" target="_blank">Natisni</a></span>{% endif %}
    </th>
	</table>
</div>

<div class="module" id="searchlist">
	<table cellspacing="0"> 
		<tr>
		  <td>Osnovni podatki:</td>
		</tr>
	</table>
</div>

<table class="module" id="searchlist">
  <tr class="row1">
    <td width="200">
      <b>Vpisna številka</b> 
    </td>
    <td>
      {{ user_profile.student_number }}
    </td>
  </tr>
  <tr class="row2">
    <td>
      <b>Priimek in ime</b> 
    </td>
    <td>
      {{ user_profile.surname }} {{ user_profile.name }}
    </td>
  </tr>
  <tr class="row1">
    <td>
      <b>EMŠO</b> 
    </td>
    <td>
      {{ user_profile.identity_num }}
    </td>
  </tr>
  <tr class="row2">
    <td>
      <b>Davčna številka</b> 
    </td>
    <td>
      {{ user_profile.fiscal_code }}
    </td>
  </tr>
  <tr class="row1">
    <td>
      <b>Posebne potrebe</b> 
    </td>
    <td>
      {{ user_profile.special_needs|default:"<i>brez</i>" }}
    </td>
  </tr>
</table>

<div class="module" id="searchlist">
  <table cellspacing="0"> 
    <tr>
      <td>Kontaktni podatki:</td>
    </tr>
  </table>
</div>

<table class="module" id="searchlist">
  <tr class="row1">
    <td width="200">
      <b>Telefonska številka</b> 
    </td>
    <td>
      {{ user_profile.phone_num }}
    </td>
  </tr>
  <tr class="row2">
    <td width="200">
      <b>Mobilni telefon</b> 
    </td>
    <td>
      {{ user_profile.mobile_num|default:"<i>brez</i>" }}
    </td>
  </tr>
  <tr class="row1">
    <td width="200">
      <b>E-pošta</b> 
    </td>
    <td>
      <a href="mailto:{{ user_profile.email }}">{{ user_profile.email }}</a>
    </td>
  </tr>
</table>

<div class="module" id="searchlist">
	<table cellspacing="0"> 
		<tr>
		  <td>Stalno bivališče:</td>
		</tr>
	</table>
</div>
  
<table class="module" id="searchlist">
  <tr class="row2">
    <td width="200">
      <b>Naslov</b> 
    </td>
    <td>
      {{ user_profile.address }}
    </td>
  </tr>
  <tr class="row1">
    <td>
      <b>Pošta</b> 
    </td>
    <td>
      {{ user_profile.post.postal_num }} {{ user_profile.post.post_office }}
    </td>
  </tr>
  <tr class="row2">
    <td>
      <b>Občina</b> 
    </td>
    <td>
      {{ user_profile.region.name }}
    </td>
  </tr>
  <tr class="row1">
    <td>
      <b>Država</b> 
    </td>
    <td>
      {{ user_profile.country.name }}
    </td>
  </tr>
</table>


{% if user_profile.tmp_address %}
<div class="module" id="searchlist">
  <table cellspacing="0"> 
    <tr>
      <td>Začasno bivališče:</td>
    </tr>
  </table>
</div>
  
<table class="module" id="searchlist">
  <tr class="row2">
    <td width="200">
      <b>Naslov</b> 
    </td>
    <td>
      {{ user_profile.tmp_address }}
    </td>
  </tr>
  <tr class="row1">
    <td>
      <b>Pošta</b> 
    </td>
    <td>
      {{ user_profile.tmp_post.postal_num }} {{ user_profile.post.post_office }}
    </td>
  </tr>
  <tr class="row2">
    <td>
      <b>Občina</b> 
    </td>
    <td>
      {{ user_profile.tmp_region.name }}
    </td>
  </tr>
</table>
{% endif %}

<div class="module" id="searchlist">
  <table cellspacing="0"> 
    <tr>
      <td>Vpisi:</td>
    </tr>
  </table>
</div>

{% for enr in user_profile.enrollment_forms.all %}
	<div class="module" id="searchlist">         
	<table>
	       <thead>
	        <tr>
	          <th>Študijsko leto: {{ enr.school_year }}</th>
	        </tr>
	        </thead>
	
	<tr class="row1"><td>
	
	<div class="module" id="searchlist">
	<table>
	  <tr>
	    <td>Univerzitetni program: {{ enr.university_program }}</td>
	    <td>Vrsta vpisa: {{ enr.get_enrollment_type_display }} </td>
	  </tr>
	  <tr>
	    <td>Letnik: {{ enr.study_year }}</td>
	    <td>Način: {{ enr.get_study_mode_display }} </td>
	  </tr>
	</table>
	</div>
	</table>
	</div>
{% empty %}
	<table class="module" id="searchlist">
	  <tr class="row2">
	    <td>
	      <i>brez</i>
	    </td>
	  </tr>
	</table>
{% endfor %}
{% endblock %}